Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Adorner Layer Clipping #13921

Merged
merged 4 commits into from
Jan 17, 2024
Merged

Fix Adorner Layer Clipping #13921

merged 4 commits into from
Jan 17, 2024

Conversation

grokys
Copy link
Member

@grokys grokys commented Dec 12, 2023

What does the pull request do?

Fixes two problems described in #10701:

  • Don't override AdornerLayer.IsClipEnabled when adding an adorner to the adorner layer: this property should be set by the user.
  • Use correct clip bounds for adorners in composition server: only take the adorned visual's clip bounds into account if the adorner is actually clipped to these bounds. This fixes the artifacts one can see in the control catalog and also fixes the ScrollViewer artifacts described in Broken Adorner Layer Invalidation or Clipping #10701 (comment)

Also fixes #10700 by setting AdornerLayer.IsClipEnabled to false on GridSplitter's adorner.

Fixed issues

FIxes #10700
Fixes #10701

The user should be able to set this on an adorner themselves.
Only take the adorned visual's clip bounds into account if the adorner is clipped to these bounds.
@grokys grokys added bug backport-candidate-11.0.x Consider this PR for backporting to 11.0 branch labels Dec 12, 2023
Default setting is `true`, but this was being overridden in `AdornerLayer.AddVisualAdorner`. That was fixed by an earlier commit in this PR, so property needs to be set explicitly to false in ControlCatalog.
@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.1.999-cibuild0042839-beta. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@maxkatz6 maxkatz6 merged commit eddd7df into master Jan 17, 2024
7 checks passed
@maxkatz6 maxkatz6 deleted the fixes/10701-adornerlayer-clipping branch January 17, 2024 05:27
@maxkatz6 maxkatz6 added backported-11.0.x and removed backport-candidate-11.0.x Consider this PR for backporting to 11.0 branch labels Jan 17, 2024
maxkatz6 pushed a commit that referenced this pull request Jan 17, 2024
* Don't overwrite IsClipEnabled.

The user should be able to set this on an adorner themselves.

* Use correct clip bounds for adorners.

Only take the adorned visual's clip bounds into account if the adorner is clipped to these bounds.

* Disable clipping on GridSplitter adorner.

Fixes #10700

* Don't clip adorners in ControlCatalog.

Default setting is `true`, but this was being overridden in `AdornerLayer.AddVisualAdorner`. That was fixed by an earlier commit in this PR, so property needs to be set explicitly to false in ControlCatalog.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Broken Adorner Layer Invalidation or Clipping GridSplitter ShowPreview doesn't work
3 participants